package com.qf.j2105.controller;


import com.qf.j2105.po.cz;
import com.qf.j2105.po.ers;
import com.qf.j2105.service.CzAndErs;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.Resources;
import java.util.List;

@RestController
public class czAndErsController {
    @Resource
    private CzAndErs czAndErs;
    @RequestMapping(value = "/cz",method = RequestMethod.GET)
    @ResponseBody
    public List<cz> findCzAll(){
        List<cz> all = czAndErs.findCzAll();
        return all;
    }
    @RequestMapping(value = "/ers",method = RequestMethod.GET)
    @ResponseBody
    public List<ers> findErsAll(){
        List<ers> all = czAndErs.findErsAll();
        return all;
    }
}
